package com.foreveross.fetl.vo;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class TaskTemplateAssignDayVO {
	private Long id;
	private Long templateId;
	private Integer dayType;
	private Integer assignFlightDay;
	private Integer assignRoundDay;
	private Date startDate = new Date();
	private Date endDate = new Date();
	private Integer futureCycle;
	private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getTemplateId() {
		return templateId;
	}

	public void setTemplateId(Long templateId) {
		this.templateId = templateId;
	}

	public Integer getDayType() {
		return dayType;
	}

	public void setDayType(Integer dayType) {
		this.dayType = dayType;
	}

	public Integer getAssignFlightDay() {
		return assignFlightDay;
	}

	public void setAssignFlightDay(Integer assignFlightDay) {
		this.assignFlightDay = assignFlightDay;
	}

	public Integer getAssignRoundDay() {
		return assignRoundDay;
	}

	public void setAssignRoundDay(Integer assignRoundDay) {
		this.assignRoundDay = assignRoundDay;
	}

	public String getStartDate() {
		if (null == startDate)
			return null;
		return sdf.format(startDate);
	}

	public Date getStartDate1() {
		return startDate;
	}

	public void setStartDate(String startDate) {
		if (null == startDate || startDate.isEmpty())
			return;
		try {
			this.startDate = sdf.parse(startDate);
		} catch (ParseException e) {
			e.printStackTrace();
		}
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public String getEndDate() {
		if (null == endDate)
			return null;
		return sdf.format(endDate);
	}

	public Date getEndDate1() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public void setEndDate(String endDate) {
		if (null == endDate || endDate.isEmpty())
			return;
		try {
			this.endDate = sdf.parse(endDate);
		} catch (ParseException e) {
			e.printStackTrace();
		}
	}

	public Integer getFutureCycle() {
		return futureCycle;
	}

	public void setFutureCycle(Integer futureCycle) {
		this.futureCycle = futureCycle;
	}
}
